/**
*	底部导航
**/
app.controller('globalNavCtrl', ['$scope', '$state', '$stateParams',
  function($scope, $state, $stateParams) {
    // 导航配置
    $scope.navConfig = {
      showSiderBar: false
    };

    // 显示侧栏
    $scope.showSiderBar = function () {
      $scope.navConfig.showSiderBar = !$scope.navConfig.showSiderBar;
    };

    // 选择左侧导航
    $scope.jumpNav = function (sref) {
      var _params = arguments[1] || {};
      $scope.navConfig.showSiderBar = false;
      $state.go(sref, _params);
    }

    // 隐藏左侧导航
    $scope.hideSiderBar = function (e) {
        $scope.navConfig.showSiderBar = false;
    };
  }
]);
